		/** @file unittest2.c
		*	@brief Tests for handCard()
		*/


#include "dominion.h"
#include "dominion_helpers.h"
#include <assert.h>
#include <stdio.h>
#include <limits.h>

int main(int argc, char **argv )
{

	printf("Running tests for handCard().\n");

	//int handCard(int handPos, struct gameState *state)

int nPlayers = 2;
int k[]      = {adventurer,
				council_room,
				feast,
				gardens,
				mine,    
				remodel,
				smithy,    
				village,     
				baron,    
				great_hall  };
int seed = 2;				
struct gameState g1;

initializeGame(nPlayers, k, seed, &g1);

int player  = 0;
int n = 5; // number of cards in hand
g1.handCount[player] = n;

for (int i = 0; i < n; i++) {
	g1.hand[player][i] = i;
}
for (int i = 0; i < n; i++) {
	assert(handCard(i, &g1) == i);
}

 

printf("Tests for handCard() passed.\n");


}
